package com.bird.controller.frontend;

import com.bird.domain.dto.MainPageInfoDTO;
import com.bird.domain.dto.Result;
import com.bird.server.combine.HeadLineShopCategoryCombineService;
import lombok.Getter;
import org.simpleFramework.core.annotation.Controller;
import org.simpleFramework.core.inject.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: sijunqiang
 * @Date: 2020/3/29 20:12
 * @Description: 控制层
 */
@Controller
@Getter
public class MainPageController {

    @Autowired
    private HeadLineShopCategoryCombineService headLineShopCategoryCombineService;

    /**
     * 获取头条的列表和商品的内容
     *
     * @param request
     * @param response
     * @return
     */
    public Result<MainPageInfoDTO> getMainPageInfo(HttpServletRequest request, HttpServletResponse response) {
        return headLineShopCategoryCombineService.getMainPageInfo();
    }
}
